package com.yourenbang.lingyun.transaction.web.domain.dto.pay.app;

import com.yourenbang.lingyun.constants.enums.ChannelIdEnums;
import com.yourenbang.lingyun.constants.enums.PlatNoEnums;
import com.yourenbang.lingyun.constants.enums.pay.PayFromEnum;
import com.yourenbang.lingyun.core.base.validator.EnumValue;
import com.yourenbang.lingyun.core.util.json.ToJSON;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class ToPupDTO implements Serializable, ToJSON {

    @NotBlank(message = "用户id不可空")
    private String userBaseId;

    @EnumValue(enumClass= PayFromEnum.class, message = "支付类型未通过校验")
    private String payFrom;

    @Pattern(regexp = "^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$", message = "请输入合法金额")
    private String amount;

    @EnumValue(enumClass= PlatNoEnums.class, message = "系统类型未通过校验")
    private Short platNo;

    @EnumValue(enumClass= ChannelIdEnums.class, message = "渠道类型未通过校验")
    private Short channelId;

}
